package collection.Demo04;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author Miku
 * @Create 2021/4/12 16:25
 */
public class Test {
    public static void main(String[] args) {
        //创建集合
        List list = new ArrayList();
        //添加数字数据(自动装箱)
        list.add(20);
        list.add(30);
        list.add(40);
        list.add(50);
        list.add(60);
        System.out.println("元素个数:"+list.size());
        System.out.println(list);

        //删除操作
        list.remove(new Integer(20));
        System.out.println(list);

        //subList()方法
        System.out.println(list.subList(1, 3));

    }
}
